package com.example.netty;

import com.example.netty.server.NettyServer;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@Log4j2
public class NettyApplication {

    public static void main(String[] args) {
        SpringApplication.run(NettyApplication.class, args);
        try {
            NettyServer bootstrap = new NettyServer(9999);
            bootstrap.start();
            log.error("server socket 启动成功!");
        } catch (Exception e) {
            e.printStackTrace();
            log.error("server socket 启动失败!", e);
        }
    }

}